<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

if(!defined('TinyFW')) exit('Access denied!');

class tfCookie {

    private  $time;
    private  $cookie_path;
    private  $cookie_domain;
    
    private static  $instance;

    private function __construct() {
        $this->time = time() + (60 * 60 * 24 * 1);
        $this->cookie_path = "/";
        $this->cookie_domain = tfConfig::getConfig('sys_domain');
    }

    public function __clone() {
        
    }

    public static function singleton() {
        if(!isset(self::$instance)) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    private function _set_cookie($key, $value) {
        setcookie($key, $value, $this->time, $this->cookie_path, $this->cookie_domain);
    }
    
    
}
?>
